package cn.dada.dadarecipes.community.article.mapper;

import cn.dada.dadarecipes.community.article.pojo.entity.Article;
import cn.dada.dadarecipes.community.article.pojo.vo.ArticleVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ArticleMapper {
    void insertArticle(Article article);

    void deleteArticle(Long articleId);

    void updateArticle(Article article);
    void updateArticleSkimNum(Long articleId);
    Boolean updateArticleStatus(Article article);
    Boolean updateArticleLikesTotalNums(@Param("articleId") Long articleId,@Param("num") int num);
    void updateArticleComment(@Param("articleId") Long articleId,@Param("num") int num);

    List<ArticleVO> selectArticle(Article article);
    Long selectArticleId(Long articleId);
    Long selectArticleUserId(Long articleId);

}
